#include "server.h"


int handle_puts(int net_fd , ClientInfo *client, const char* filename) {

    client->socket = net_fd;

    Message response;

    // TODO: 实现文件接收逻辑

    response.type = MSG_TYPE_SUCCESS;
    response.length = snprintf(response.data, sizeof(response.data), "文件 %s 上传成功", filename);

    if (send_message(client->socket, &response) < 0) {
        perror("发送puts响应失败");
        return -1;
    }

    return 0;
}
